package com.liu.project.service.impl;

import com.liu.project.dao.MajorMapper;
import com.liu.project.dao.SubjectMapper;
import com.liu.project.pojo.Major;
import com.liu.project.pojo.Subject;
import com.liu.project.service.MajorService;
import com.liu.project.service.SubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: project
 * @description:
 * @author: 86187
 * @create: 2022-03-20 15:46
 **/

@Service
public class MajorServiceImpl implements MajorService {

    @Autowired
    MajorMapper majorMapper;
    @Override
    public List<Major> getAll() {
        return majorMapper.getAll();
    }

    @Override
    public List<Major> getMajorByKey(String key) {
        return majorMapper.getMajorByKey(key);
    }

    @Override
    public double getNameById(int id) {
        return majorMapper.getNameByid(id);
    }
}
